﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style>/*<![CDATA[*/

table{border: 1px solid gray;}
td{border: 1px dotted gray;}
p{margin: 3px 0 3px 0; padding: 0;}
#ID_Footer{font-size: small; font-style: italic; text-align: right; margin-top: 4em; padding-top: 4px; border-top: 2px solid gray;}

/*]]>*/</style><title>DTD</title></head><body>
<div><span style="font-weight: bold; color: rgb(0, 0, 0); line-height: 190%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 30px;"><b>网页首部的 DTD 声明</b></span></font></div><div><span class="Apple-style-span" style="font-family: Consolas; "><span style="font-weight: bold; color: rgb(0, 0, 0); line-height: 190%; "><br></span></span></div><div><span class="Apple-style-span" style="font-family: Consolas; "><span style="color: rgb(0, 0, 0); line-height: 18px;">&nbsp; &nbsp;&nbsp;</span><span style="font-weight: bold; color: rgb(0, 0, 0); line-height: 190%; ">HTML5声明</span></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 240%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 31px; ">&lt;!DOCTYPE html&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-weight: bold; line-height: 190%; ">一般html页面声明, 即</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; "><b><font class="Apple-style-span" color="#0000ff">XHTML1.0 Transitional DTD</font></b>（过渡的文档类定义）</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE html PUBLIC </span><span style="color: rgb(0, 128, 128); line-height: 140%; ">"-//W3C//DTD XHTML 1.0 Transitional//EN"&nbsp;</span><span style="color: rgb(0, 0, 255); line-height: 140%; ">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: rgb(0, 0, 0); line-height: 140%; ">&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><b><font class="Apple-style-span" face="Consolas">DTD</font></b></div><div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="font-weight: bold; color: rgb(255, 0, 0); line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-weight: bold; color: rgb(255, 0, 0); line-height: 140%; ">DTD</span><span style="color: rgb(0, 0, 0); line-height: 140%; ">意为Document Type Definition（文档类型定义）</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="color: rgb(255, 0, 0); font-weight: bold; line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="color: rgb(255, 0, 0); font-weight: bold; line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></font></div><div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp; a.&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">HTML文档中的DTD声明始终以<b><font class="Apple-style-span" color="#800000">!DOCTYPE</font></b>开头</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp; b.&nbsp;</span><span style="line-height: 140%; ">空一格后跟着文档</span><span style="font-weight: bold; line-height: 140%; ">根元素的名称</span><span style="line-height: 140%; ">（网页也就是<font class="Apple-style-span" color="#800000"><b>HTML</b></font>）</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp; c.&nbsp;</span><span style="line-height: 140%; ">如果是</span><span style="font-weight: bold; line-height: 140%; ">内部DTD</span><span style="line-height: 140%; ">，则再空一格出现[ ]，在中括号中是</span><span style="font-weight: bold; line-height: 140%; ">文档类型定义的内容</span><span style="line-height: 140%; ">。而对于</span><span style="font-weight: bold; line-height: 140%; ">外部DTD</span><span style="line-height: 140%; ">，则又分为</span><span style="font-weight: bold; line-height: 140%; ">私有DTD</span><span style="line-height: 140%; ">与</span><span style="font-weight: bold; line-height: 140%; ">公共DTD</span><span style="line-height: 140%; ">.</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp; *&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">私有DTD使用SYSTEM表示，接着是外部DTD的URL。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp; *&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">而公共DTD则使用<font class="Apple-style-span" color="#800000"><b>PUBLIC</b></font>，接着是DTD公共名称，接着是DTD的URL。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">公共DTD，DTD名称格式为"</span><span style="font-weight: bold; line-height: 140%; ">注册//组织//类型 标签//语言</span><span style="line-height: 140%; ">"</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">" 注册 " &nbsp;指示组织是否由国际标准化组织(ISO)注册，+表示是，-表示不是。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">" 组织 " &nbsp;即组织名称，如：W3C；</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">" 类型 " &nbsp;一般是DTD，</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">" 标签 " &nbsp;是指定公开文本描述，即对所引用的公开文本的唯一描述性名称，后面可附带版本号。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">" 语言 " &nbsp;是DTD语言的ISO 639语言标识符，如：EN表示英文，ZH表示中文。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><b>浏览器是怎样知道你用的是什么标记语言然后正确对待这段代码呢？</b></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">这就是DTD的工作了。一个DTD应该放在每一个文档的第一行。这样正确地放置，你的DTD才能告诉浏览器的用的是什么标记语言。在通常情况下，如果你编写的是正确代码，并拥有一个合适的DTD，浏览器将会根据W3C的标准显示你的代码。</span></font></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; "><b>如果说你没有使用DTD</b>，你将很难预测浏览器是怎样显示你的代码，仅仅在同一浏览器就有不同的显示效果。尽管你的网页做得非常飘亮，要是没有使用DTD，你的努力也是白费的。因此，一个DTD是必不可少的。</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><b>各种DTD</b></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<b><font class="Apple-style-span" color="#ff6600">XHTML</font></b>较为规范，他的DTD分为几种：Strick、Transitional和Frameset</font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; "><font class="Apple-style-span" color="#0000ff"><b>XHTML1.0 Strict DTD</b></font>（严格的文档类定义）：要求严格的DTD，你不能使用表现标识和属性，和CSS一同使用。完整代码如下：</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" &nbsp;"</span><a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"> &nbsp;</font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; "><b><font class="Apple-style-span" color="#0000ff">XHTML1.0 Transitional DTD</font></b>（过渡的文档类定义）：要求非常宽松的DTD，它允许你继续使用HTML4.01的标识(但是要符合xhtml的写法)。完整代码如下：</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE html &nbsp;PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &nbsp;"</span><a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"> &nbsp;</font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; "><font class="Apple-style-span" color="#0000ff"><b>XHTML1.0 Frameset DTD</b></font>（框架集文档类定义）:专门针对框架页面设计使用的DTD，如果你的页面中包含有框架，需要采用这种DTD。完整代码如下： &nbsp; &nbsp;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" &nbsp;"</span><a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font></span></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<font class="Apple-style-span" color="#ff6600"><b>HTML</b></font>的语法就非常宽松了，他的DTD也分为一样的三种。</font></span></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">HTML 4.01 Strict DTD （严格的文档类定义）不能包含已过时的元素（或属性）和框架元素。对于使用了这类DTD的文档，使用如下文档声明：</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "</span><a href="http://www.w3.org/TR/html4/strict.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/html4/strict.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">HTML 4.01 Transitional DTD（过渡的文档类定义）能包含已过时的元素和属性但不能包含框架元素。对于使用了这类DTD的文档，使用如下文档声明： &nbsp; &nbsp;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" &nbsp;"</span><a href="http://www.w3.org/TR/html4/loose.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/html4/loose.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">HTML 4.01 Frameset DTD（框架集文档类定义）。能包含已过时的元素和框架元素。对于使用了这类DTD的文档，使用如下文档声明：</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" &nbsp;"</span><a href="http://www.w3.org/TR/html4/frameset.dtd" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://www.w3.org/TR/html4/frameset.dtd</a><span style="color: rgb(0, 0, 0); line-height: 140%; ">"&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;更早的HTML版本：HTML 3.2 &nbsp; </font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt; &nbsp;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;更早的HTML版本：HTML 2.0 &nbsp; &nbsp;</font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span style="line-height: 140%; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span class="Apple-style-span" style="line-height: 18px; ">&lt;!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;</span></font></div>
<div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><b>我们选择什么样的DOCTYPE</b></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div>
<div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;理想情况当然是严格的DTD，但对于我们大多数刚接触web标准的设计师来说，<font class="Apple-style-span" color="#ff0000"><b>过渡的DTD</b></font>是目前理想选择。因为这种DTD还允许我们使用表现层的标识、元素和属性，也比较容易通过W3C的代码校验。</font></span></div>
<div><span class="Apple-style-span" style="line-height: 18px; "><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></span></div><div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="line-height: 140%; ">上面说的"表现层的标识、属性"是指那些纯粹用来控制表现的tag，例如用于排版的表格（&lt;table&gt;标签）、换行（&lt;br&gt;标签）和背景颜色标识等。在XHTML中标识是用来表示结构的，而不是用来实现表现形式，我们过渡的目的是最终实现数据和表现相分离。</span></font></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><b>References</b></font></span></div><div><span style="line-height: 140%; "><font class="Apple-style-span" face="Consolas"><br></font></span></div>
<div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="line-height: 18px; ">&nbsp; &nbsp; [1] &nbsp;</span><a href="http://blog.sina.com.cn/s/blog_44dd2a630100pc6y.html" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://blog.sina.com.cn/s/blog_44dd2a630100pc6y.html</a></font></div>
<div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; [<span style="line-height: 140%; ">2] &nbsp;</span><a href="http://blog.csdn.net/caomiao2006/article/details/9223421" style="text-decoration: underline; color: rgb(0, 0, 255); ">http://blog.csdn.net/caomiao2006/article/details/9223421</a><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div>
<div><br></div><script type="text/javascript" language="javascript" src="jquery.js"></script><script type="text/javascript" language="javascript" src="itemlink.js"></script></body></html>